package jkd.training.rest;

import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

@Path("/elecbill/")
public class BillPaymentCollector {


	@POST
	@Path("/charge/")
	@Consumes({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})
	public Response charge(final BillPayment payment){
		
		System.out.println("Hit the service." + payment);

		return Response.ok(payment.getBillReference()).build();
	}

	
}
